-- GENERATED SPELL FOR [Anvilrage Guardsman] --


function spell0_8891(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8891', 5276, 1)
end

function spell1_8891(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_8891', 5350, 1)
end

function spell2_8891(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8891', 30294, 1)
end

function Sorts_8891(pUnit, Event)
local choix_sorts_8891 = math.random(0, 2)
if choix_sorts_8891 == 0 then
pUnit:RegisterEvent('spell0_8891', 1, 1)
end
if choix_sorts_8891 == 1 then
pUnit:RegisterEvent('spell1_8891', 1, 1)
end
if choix_sorts_8891 == 2 then
pUnit:RegisterEvent('spell2_8891', 1, 1)
end
end

function mob8891_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8891', math.random(1500, 3000), 1)
end

function mob8891_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8891_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8891_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8891, 1, 'mob8891_Action')
RegisterUnitEvent(8891, 2, 'mob8891_Leave')
RegisterUnitEvent(8891, 3, 'mob8891_Kill')
RegisterUnitEvent(8891, 4, 'mob8891_Die')
